Skip to content

Re-export CredentialConfigTarget and StructuredBaseUrlSource from credential-shaping - #94

Merged
sharon-wang merged 1 commit into
mainfrom
fix/credential-shaping-reexports
Aug 27, 2026
Merged

Re-export CredentialConfigTarget and StructuredBaseUrlSource from credential-shaping#94
sharon-wang merged 1 commit into
mainfrom
fix/credential-shaping-reexports

Conversation

@sharon-wang

@sharon-wang sharon-wang commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

ai-provider-bridge/credential-shaping is documented as re-exporting the public API of ai-credentials/types unchanged. Two types that the re-exported API references were missing from the list, so consumers can't name them:

  • CredentialConfigTarget — every method on the re-exported CredentialConfig takes one (getBaseUrl, getCustomHeaders, getAws, getSnowflake, getDatabricks)
  • StructuredBaseUrlSource — the type of AuthProviderMapping.structuredBaseUrl, also re-exported

Introduced in 6a3ef17 (#71), which added CredentialConfigTarget and changed the reader signatures from string to it, without updating this re-export list.

Why it matters

A consumer implementing CredentialConfig can write the object literal fine (contextually typed), but factoring out a helper needs to name the type — and can't, since it's not exported here. Positron's headless language-model facade hit this and worked around it with Parameters<CredentialConfig['getBaseUrl']>[0] instead of importing the type directly, since this entry point is its one seam into the bridge.

needed for posit-dev/positron#15675

Test plan

  • npm run build (all three workspaces)
  • npm run check-types (all three workspaces + shape guard)

…dential-shaping

The bridge's re-export list fell behind ai-credentials/types when the reader
signatures on CredentialConfig moved from string to CredentialConfigTarget,
so consumers of the documented entry point couldn't name either type.
@sharon-wang

Copy link
Copy Markdown
Member Author

just gonna take the liberty to merge without review since it's just a small re-export change 🤪

@sharon-wang
sharon-wang merged commit a05f21e into main Aug 27, 2026
4 checks passed
@sharon-wang
sharon-wang deleted the fix/credential-shaping-reexports branch August 27, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant